#pragma once

#include <boostext/typedefs.hpp>

#include "exports.hpp"
#include "ReflectionFormat.hpp"




/**
 * The StaticReflectionElement class describes one element in a class.
 * Each element has a name, an optional semantic index (can be 0)
 * a format (that describes what POD type it belongs to) and an
 * offset to the start of the structure the element is placed in.
 *
 * @warning   It is very important that, when describing a structure,
 *            the table is allocated on the static storage, otherwise
 *            the reflection system produces undefined behavior.
 *
 * @see GuiVertex::layout() for an example
 */
struct ENGINE_CORE_API StaticReflectionElement
{
	const char*    semanticName;
	uint32         semanticIndex;
	Format::Type   format;
	uint32         relativeOffset;
};
///////////////////////////////////////////////////////////////////////////////////////////////////




/**
 * The ReflectionElement offers the same features as the StaticReflectionElement,
 * however it can be allocated on any storage (static, stack and heap). It does
 */
struct ENGINE_CORE_API ReflectionElement
{
	std::string    semanticName;
	uint32         semanticIndex;
	Format::Type   format;
	uint32         relativeOffset;
};
///////////////////////////////////////////////////////////////////////////////////////////////////
